package com.sciai.controller;

import cn.com.sciai.aix.common.http.SciaiHttpResponseEntity;
import com.sciai.Service.CsvDataService;
import com.sciai.Service.TBusinessService;
import com.sciai.mapper.WeatherMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 导入 <类名>
 *
 */
@Slf4j
@RestController
@RequestMapping("/import")
public class CSVImportController {

    @Resource
    private CsvDataService csvDataService;
    @Resource
    private WeatherMapper WeatherMapper;
    @Resource
    private TBusinessService tBusinessService;
    @Value("${file.csvFile1}")
    private String csvFile1;

    @GetMapping("/csv")
    public SciaiHttpResponseEntity CSVImport(){
            return csvDataService.CSVImport(csvFile1);
    }

}
